Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

286
Views
Error: "Debe proporcionar un token de acceso a la aplicación o un token de acceso de usuario que sea propietario o desarrollador de la aplicación" mediante el SDK de inicio de sesión de Facebook

Tengo el problema que los usuarios pueden usar nuestro sistema para solicitar informes de sus anuncios en facebook.

Estas son las funciones que uso en el frontend (React):

 export function initFacebookSdk() { return new Promise(resolve => { // wait for facebook sdk to initialize before starting the react app window.fbAsyncInit = function () { window.FB.init({ appId: 'app-id', cookie: true, xfbml: true, version: 'v14.0' }); resolve() }; }); } export const FbLogin = () => { loadFacebookSDK(document, "script", "facebook-jssdk") initFacebookSdk() return new Promise( resolve => { window.FB.login(response => { if (response.authResponse) { resolve(response); } else { resolve(response); } }, {scope: 'ads_management,ads_read'}); }) }

Y entonces llamo a la función

 const response = await FbLogin();

Envío el token al backend y así es como usa la ruta:

 try { const { data: accountsInfo } = await axios({ url: `https://graph.facebook.com/v${FB_GRAPH_API_VERSION}/me/adaccounts?access_token=${accessToken}&pretty=1&limit=100`, method: 'GET', }); res.status(200).json({success: true, accountsInfo}) } catch (err) { console.log(err); res.status(500).json({success: false}) }

Y este es el error que me sale al intentar usar el token de usuario:

 'OAuth "Facebook Platform" "invalid_request" "(#100) You must provide an app access token, or a user access token that is an owner or developer of the app"'

¿Alguien sabe por qué me está pasando esto? ayuda :(

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!